import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: "/recommend"
  },
  {
    path: '/recommend',
    name: 'Recommend',
    component: () => import('@/views/Recommend')
  },
  {
    path: '/hot',
    name: 'Hot',
    component: () => import('@/views/Hot')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('@/views/Search')
  },
  {
    path: '/songitem/:id',
    name: 'SongItem',
    props:true,
    component: () => import('@/views/SongItem')
  },
  {
    path: '/singerdes',
    name: 'SingerDes',
    component: () => import('@/views/SingerDes')
  },
  {
    path: '/moreplaylist',
    name: 'MorePlayList',
    component: () => import('@/views/MorePlayList')
  },
  {
    path: '/bangdan',
    name: 'BangDan',
    component: () => import('@/views/BangDan')
  }
]

const router = new VueRouter({
  mode:'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
